#ifndef FORMAT_H
#define FORMAT_H

#include <iostream>
#include <QImage>

#include "point.h"
#include "pixel.h"
#include "canvas.h"
#include "converter.h"

using namespace std;

#define L_0 30660 // 111011111000100
#define L_1 29427 // 111001011110011
#define L_2 32170 // 111110110101010
#define L_3 30877 // 111100010011101
#define L_4 26159 // 110011000101111
#define L_5 25368 // 110001100011000
#define L_6 27713 // 110110001000001
#define L_7 26998 // 110100101110110

class format
{
public:
    format();
    void checkFormat (point upperLeft, point lowerLeft, point upperRight, int pixelProportion, QImage* img);
    char getECCLevel ();
    int getMaskPattern ();

    void setCanvas (canvas *log);

private:
    char eccLevel;
    int maskPattern;

    canvas *log;
};

#endif // FORMAT_H
